package com.xiongjie.base;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Context;
import io.vertx.core.Future;
import io.vertx.core.Vertx;

/**
 * 学习vertx的生命周期流程
 */
public class LifeVertx extends AbstractVerticle {

    @Override
    public void init(Vertx vertx, Context context) {
        System.out.println("调用方法：init");
        super.init(vertx, context);
    }

    @Override
    public void start(Future<Void> startFuture) throws Exception {
        System.out.println("调用方法：start(Future<Void> startFuture)");
        super.start(startFuture);
    }

    @Override
    public void start() throws Exception {
        System.out.println("调用方法：start()");
        super.start();
    }

    @Override
    public void stop(Future<Void> stopFuture) throws Exception {
        System.out.println("调用方法：stop(Future<Void> stopFuture)");
        super.stop(stopFuture);
    }

    @Override
    public void stop() throws Exception {
        System.out.println("调用方法：stop()");
        super.stop();
    }
}
